package com.example.dessert.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.dessert.dao.OrderDetailMapper;
import com.example.dessert.entity.OrderDetail;
import com.example.dessert.service.OrderDetailService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName: OrderDetailServiceImpl
 * @Description:
 * @Author
 * @Date 2022/1/20
 * @Version 1.0
 */
@Service
public class OrderDetailServiceImpl implements OrderDetailService {

    @Resource
    private OrderDetailMapper orderDetailMapper;

    @Override
    public List<OrderDetail> queryOrderDetailList(Long orderId){

        QueryWrapper<OrderDetail> wrapper = new QueryWrapper<>();
        wrapper.eq("order_id",orderId);
        return orderDetailMapper.selectList(wrapper);

    }

}
